﻿<phone:PhoneApplicationPage 
    x:Class="Webtextr.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" d:DesignHeight="696" d:DesignWidth="480" IsEnabled="True" Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="WEBTEXTR" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="compose sms" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <TextBox Height="72" HorizontalAlignment="Left" Margin="0,3,0,0" Name="recipient" VerticalAlignment="Top" Width="230">
                <TextBox.InputScope>
                    <InputScope>
                        <InputScopeName NameValue="Number" />
                    </InputScope>
                </TextBox.InputScope>
            </TextBox>
            <TextBox Height="430" HorizontalAlignment="Left" Margin="0,90,0,0" Name="msgText" VerticalAlignment="Top" Width="460" TextWrapping="Wrap" AcceptsReturn="True">
                <TextBox.InputScope>
                    <InputScope>
                        <InputScopeName NameValue="Text" />
                    </InputScope>
                </TextBox.InputScope>
            </TextBox>
            <Button Content="Choose Contact" Height="72" HorizontalAlignment="Left" Margin="230,3,0,0" Name="chooseContact" VerticalAlignment="Top" Width="230" Click="ChooseContactClick" />
            <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,-17,0,0" Name="textBlock1" Text="Recipient:" VerticalAlignment="Top" />
            <TextBlock Height="30" HorizontalAlignment="Left" Margin="12,71,0,0" Name="textBlock2" Text="Message text:" VerticalAlignment="Top" />
        </Grid>


        <Grid Name="sendingOverlay" Background="#CC000000" Margin="0,0,0,-76" Grid.RowSpan="2" Visibility="Collapsed" >
            <ProgressBar Height="20" HorizontalAlignment="Center" Margin="0,672,0,80" Name="sendingProgressBar" VerticalAlignment="Top" Width="480" IsIndeterminate="True" />
            <TextBlock Height="30" HorizontalAlignment="Center" Margin="0,692,0,0" Name="textBlock3" Text="Sending SMS..." VerticalAlignment="Top" />
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.email.rest.png" Text="Send SMS" Click="SendSmsClick" x:Name="SendButton" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.settings.rest.png" Text="Settings" Click="SettingsPageClick"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="clear message text" Click="ClearClick" x:Name="ClearButton" />
                <shell:ApplicationBarMenuItem Text="about" Click="AboutClick" x:Name="AboutButton" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>